import Mock from 'mockjs'
const Random = Mock.Random
const idrandom = () => {
  return Random.string('upper', 2) + Random.string('number', 5)
}
const mockdata = {
  '/factory/list': {
    'data': {
      'factoryVOList|3': [{
        'factoryId|+1': 1,
        'factoryName': '哈哈哈工厂',
        'simpleCabinetVOList|1-3': [{
          'cabinetId|+1': 11,
          'cabinetName|+1': '机柜',
          'cabinetStatus|1-3': 1,
          'internetStatus': 1,
          'cabinetDoorStatus|1-2': 1,
          'bigNum': 5,
          'smallNum': 15,
          'vacancyBigNum': 1,
          'vacancySmallNum': 3,
          'goodsTypeNum': 6,
          'place': '大门口'
        }]
      }]
    },
    'resultCode': 2000,
    'resultMsg': '成功'
  },
  '/cabinet/locked': {
    'data': {},
    'resultCode': 2000,
    'resultMsg': '成功'
  },
  '/cabinet/name': {
    'data': {
      'name': '江南皮革厂'
    },
    'resultCode': 2000,
    'resultMsg': '成功'
  },
  '/cabinet/list': {
    'data': {
      'cabinetVOList': [
        {
          'id': 1,
          'cabinetCode': idrandom()
        },
        {
          'id': 2,
          'cabinetCode': idrandom()
        },
        {
          'id': 3,
          'cabinetCode': idrandom()
        }
      ]
    },
    'resultCode': 2000,
    'resultMsg': '成功'
  },
  '/goods/list': {
    'data': {
      'sizeVO': {
        'data|3': [
          {
            'id|+1': 1,
            'imgUrl': 'http://pic41.nipic.com/20140601/18681759_143805185000_2.jpg',
            'code': idrandom(),
            'name': Random.name(),
            'brand': '三菱',
            'goodsModel': 'ABC123',
            'price|10-20': 0,
            'status': 1
          }
        ],
        'totalRecords': 20,
        'pageIndex': 1,
        'pageSize': 10,
        'totalPages': 2
      }
    },
    'resultCode': 2000,
    'resultMsg': '成功'
  },
  '/brand/list': {
    'data': {
      'brandList|3': [
        {
          'brandId|+1': 1,
          'brandImgUrl': 'http://pic41.nipic.com/20140601/18681759_143805185000_2.jpg',
          'brandName': Random.name(),
          'cognateGoodsNum': 2,
          'brandStatus': 1
        }
      ]
    },
    'resultCode': 2000,
    'resultMsg': '成功'
  }
}
export default mockdata
